package com.test.aop;

import com.tzy.spi.aop.Aspect;
import com.tzy.spi.aop.annotition.*;

public class MyAspect implements Aspect {
    @Override
    public Class getAspectAnnotation() {
        return Print.class;
    }




    @Before
    public void before(){
        System.out.println("before");
    }

    @After
    public void after(){
        System.out.println("after");
    }


    @AfterReturning
    public void AfterReturning(@Returning Object a){
        System.out.println("-------------------> a=" +a);
        System.out.println("AfterReturning");
    }


    @AfterThrowing
    public void AfterThrowing(@Throwing Exception e){
        System.out.println("-------------------> e=" +e);
        System.out.println("AfterThrowing");
    }

}
